-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyzers acquisition experience #10014
Analyzers acquisition experience #10014
Conversation
We decided to rename the analyzer project from BuildCop to BuildCheck. This PR is just reflecting that on the code.
Co-authored-by: Farhad Alizada <104755925+f-alizada@users.noreply.github.com>
… into exp/build-analyzers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great!
I'd love to see an end to end test of this as well :-) Doesn't have to be part of this PR (but would be nice)
e2e tests will be added in a separate PR |
Context
This PR implements acquisition flow for custom analyzers.
The process can be described the next way:
A Custom Analyzer library contains a file
Company.AnalyzerTemplate.props
.If this analyzer is referenced from any solution, MSBuild invokes intrinsic function
RegisterAnalyzer
during the evaluation. It emitsBuildCheckAcquisitionEventArgs
if the parsed path to custom analyzer is valid.This event is handled by
BuildCheckConnectorLogger
: it passes the info toIBuildCheckManager.ProcessAnalyzerAcquisition
.Tests
Manual and unit tests.
I plan to cover e2e scenarios once MSBuild.Build package with BuildCheck infrastructure is available for public reference (it is needed for custom templates).
based on: #9977